package com.example.a10928.weifriend.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.a10928.weifriend.R;
import com.example.a10928.weifriend.http.api.base.MyAdertBean;
import com.squareup.picasso.Picasso;

import java.util.List;

public class AdertAdapter extends BaseQuickAdapter<MyAdertBean.RecordsBean, BaseViewHolder> {

    public AdertAdapter(int layoutResId,  List<MyAdertBean.RecordsBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, MyAdertBean.RecordsBean item) {

        helper.setText(R.id.tv_content,item.getAd_title()+"(")
                .setText(R.id.tv_num,item.getReceived_number()+"")
                .setText(R.id.tv_total,"/"+item.getAd_number()+")")
                .setText(R.id.tv_date,item.getCreated_at())
                .setText(R.id.tv_value,"￥"+item.getAd_unit_price());

    }
}
